import com;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
 public class UserController {
//        System.out.println("orderId="+orderId);
        System.out.println("username="+username+",orderId="+orderId);
}
@RequestMapping("/user")
public String user(Model model){
    User user = new User();
    user.setUsername("张三");
    user.setPassword("123456");
    model.addAttribute("user",user);
    return "user";
}
@RequestMapping("/ouser")
public ModelAndView o(){
    ModelAndView mv = new ModelAndView();
    User user = new User();
    user.setUsername("李四");
    user.setPassword("123456789");
    mv.addObject("user",user);
    mv.setViewName("user");
    return mv;
}
